package com.example.hxds.bff.driver.feign;

import com.example.hxds.bff.driver.controller.form.CalculateIncentiveFeeForm;
import com.example.hxds.bff.driver.controller.form.CalculateOrderChargeForm;
import com.example.hxds.bff.driver.controller.form.CalculateProfitsharingForm;
import com.example.hxds.common.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * 代理规则微服务
 */
@FeignClient(value = "hxds-rule")
public interface RuleServiceApi {


    /**
     * 计算订单费用
     * @param form
     * @return
     */
    @PostMapping("/charge/calculateOrderCharge")
    R calculateOrderCharge(CalculateOrderChargeForm form);


    /**
     * 计算奖励费用
     * @param form
     * @return
     */
    @PostMapping("/award/calculateIncentiveFee")
    R calculateIncentiveFee(CalculateIncentiveFeeForm form);


    /**
     * 计算分账金额
     * @param form
     * @return
     */
    @PostMapping("/profitsharing/calculateProfitsharing")
    R calculateProfitsharing(CalculateProfitsharingForm form);
}